package com.yaorange.nongjt.service.impl;

import java.util.List;
import com.yaorange.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yaorange.nongjt.mapper.QualificationCertificateMapper;
import com.yaorange.nongjt.domain.QualificationCertificate;
import com.yaorange.nongjt.service.IQualificationCertificateService;

/**
 * 合格证管理Service业务层处理
 * 
 * @author hzliu
 * @date 2025-09-23
 */
@Service
public class QualificationCertificateServiceImpl implements IQualificationCertificateService 
{
    @Autowired
    private QualificationCertificateMapper qualificationCertificateMapper;

    /**
     * 查询合格证管理
     * 
     * @param id 合格证管理主键
     * @return 合格证管理
     */
    @Override
    public QualificationCertificate selectQualificationCertificateById(String id)
    {
        return qualificationCertificateMapper.selectQualificationCertificateById(id);
    }

    /**
     * 查询合格证管理列表
     * 
     * @param qualificationCertificate 合格证管理
     * @return 合格证管理
     */
    @Override
    public List<QualificationCertificate> selectQualificationCertificateList(QualificationCertificate qualificationCertificate)
    {
        return qualificationCertificateMapper.selectQualificationCertificateList(qualificationCertificate);
    }

    /**
     * 新增合格证管理
     * 
     * @param qualificationCertificate 合格证管理
     * @return 结果
     */
    @Override
    public int insertQualificationCertificate(QualificationCertificate qualificationCertificate)
    {
        qualificationCertificate.setCreateTime(DateUtils.getNowDate());
        return qualificationCertificateMapper.insertQualificationCertificate(qualificationCertificate);
    }

    /**
     * 修改合格证管理
     * 
     * @param qualificationCertificate 合格证管理
     * @return 结果
     */
    @Override
    public int updateQualificationCertificate(QualificationCertificate qualificationCertificate)
    {
        qualificationCertificate.setUpdateTime(DateUtils.getNowDate());
        return qualificationCertificateMapper.updateQualificationCertificate(qualificationCertificate);
    }

    /**
     * 批量删除合格证管理
     * 
     * @param ids 需要删除的合格证管理主键
     * @return 结果
     */
    @Override
    public int deleteQualificationCertificateByIds(String[] ids)
    {
        return qualificationCertificateMapper.deleteQualificationCertificateByIds(ids);
    }

    /**
     * 删除合格证管理信息
     * 
     * @param id 合格证管理主键
     * @return 结果
     */
    @Override
    public int deleteQualificationCertificateById(String id)
    {
        return qualificationCertificateMapper.deleteQualificationCertificateById(id);
    }
}
